3.1706 \(\int \frac{A+B x}{(d+e x) \left (a^2+2 a b x+b^2 x^2\right )^2} \, dx\)

Optimal. Leaf size=146 \[ \frac{e^2 \log (a+b x) (B d-A e)}{(b d-a e)^4}-\frac{e^2 (B d-A e) \log (d+e x)}{(b d-a e)^4}+\frac{e (B d-A e)}{(a+b x) (b d-a e)^3}-\frac{B d-A e}{2 (a+b x)^2 (b d-a e)^2}-\frac{A b-a B}{3 b (a+b x)^3 (b d-a e)} \]

[Out]

-(A*b - a*B)/(3*b*(b*d - a*e)*(a + b*x)^3) - (B*d - A*e)/(2*(b*d - a*e)^2*(a + b
*x)^2) + (e*(B*d - A*e))/((b*d - a*e)^3*(a + b*x)) + (e^2*(B*d - A*e)*Log[a + b*
x])/(b*d - a*e)^4 - (e^2*(B*d - A*e)*Log[d + e*x])/(b*d - a*e)^4

_______________________________________________________________________________________

Rubi [A]  time = 0.269015, antiderivative size = 146, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.065 \[ \frac{e^2 \log (a+b x) (B d-A e)}{(b d-a e)^4}-\frac{e^2 (B d-A e) \log (d+e x)}{(b d-a e)^4}+\frac{e (B d-A e)}{(a+b x) (b d-a e)^3}-\frac{B d-A e}{2 (a+b x)^2 (b d-a e)^2}-\frac{A b-a B}{3 b (a+b x)^3 (b d-a e)} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x)/((d + e*x)*(a^2 + 2*a*b*x + b^2*x^2)^2),x]

[Out]

-(A*b - a*B)/(3*b*(b*d - a*e)*(a + b*x)^3) - (B*d - A*e)/(2*(b*d - a*e)^2*(a + b
*x)^2) + (e*(B*d - A*e))/((b*d - a*e)^3*(a + b*x)) + (e^2*(B*d - A*e)*Log[a + b*
x])/(b*d - a*e)^4 - (e^2*(B*d - A*e)*Log[d + e*x])/(b*d - a*e)^4

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 80.1072, size = 119, normalized size = 0.82 \[ - \frac{e^{2} \left (A e - B d\right ) \log{\left (a + b x \right )}}{\left (a e - b d\right )^{4}} + \frac{e^{2} \left (A e - B d\right ) \log{\left (d + e x \right )}}{\left (a e - b d\right )^{4}} + \frac{e \left (A e - B d\right )}{\left (a + b x\right ) \left (a e - b d\right )^{3}} + \frac{A e - B d}{2 \left (a + b x\right )^{2} \left (a e - b d\right )^{2}} + \frac{A b - B a}{3 b \left (a + b x\right )^{3} \left (a e - b d\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x+A)/(e*x+d)/(b**2*x**2+2*a*b*x+a**2)**2,x)

[Out]

-e**2*(A*e - B*d)*log(a + b*x)/(a*e - b*d)**4 + e**2*(A*e - B*d)*log(d + e*x)/(a
*e - b*d)**4 + e*(A*e - B*d)/((a + b*x)*(a*e - b*d)**3) + (A*e - B*d)/(2*(a + b*
x)**2*(a*e - b*d)**2) + (A*b - B*a)/(3*b*(a + b*x)**3*(a*e - b*d))

_______________________________________________________________________________________

Mathematica [A]  time = 0.14822, size = 136, normalized size = 0.93 \[ \frac{6 e^2 \log (a+b x) (B d-A e)+\frac{2 (a B-A b) (b d-a e)^3}{b (a+b x)^3}+\frac{3 (b d-a e)^2 (A e-B d)}{(a+b x)^2}+\frac{6 e (a e-b d) (A e-B d)}{a+b x}+6 e^2 (A e-B d) \log (d+e x)}{6 (b d-a e)^4} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x)/((d + e*x)*(a^2 + 2*a*b*x + b^2*x^2)^2),x]

[Out]

((2*(-(A*b) + a*B)*(b*d - a*e)^3)/(b*(a + b*x)^3) + (3*(b*d - a*e)^2*(-(B*d) + A
*e))/(a + b*x)^2 + (6*e*(-(b*d) + a*e)*(-(B*d) + A*e))/(a + b*x) + 6*e^2*(B*d -
A*e)*Log[a + b*x] + 6*e^2*(-(B*d) + A*e)*Log[d + e*x])/(6*(b*d - a*e)^4)

_______________________________________________________________________________________

Maple [A]  time = 0.02, size = 220, normalized size = 1.5 \[{\frac{A}{ \left ( 3\,ae-3\,bd \right ) \left ( bx+a \right ) ^{3}}}-{\frac{Ba}{ \left ( 3\,ae-3\,bd \right ) b \left ( bx+a \right ) ^{3}}}+{\frac{Ae}{2\, \left ( ae-bd \right ) ^{2} \left ( bx+a \right ) ^{2}}}-{\frac{Bd}{2\, \left ( ae-bd \right ) ^{2} \left ( bx+a \right ) ^{2}}}+{\frac{A{e}^{2}}{ \left ( ae-bd \right ) ^{3} \left ( bx+a \right ) }}-{\frac{Bde}{ \left ( ae-bd \right ) ^{3} \left ( bx+a \right ) }}-{\frac{{e}^{3}\ln \left ( bx+a \right ) A}{ \left ( ae-bd \right ) ^{4}}}+{\frac{{e}^{2}\ln \left ( bx+a \right ) Bd}{ \left ( ae-bd \right ) ^{4}}}+{\frac{{e}^{3}\ln \left ( ex+d \right ) A}{ \left ( ae-bd \right ) ^{4}}}-{\frac{{e}^{2}\ln \left ( ex+d \right ) Bd}{ \left ( ae-bd \right ) ^{4}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x+A)/(e*x+d)/(b^2*x^2+2*a*b*x+a^2)^2,x)

[Out]

1/3/(a*e-b*d)/(b*x+a)^3*A-1/3/(a*e-b*d)/b/(b*x+a)^3*B*a+1/2/(a*e-b*d)^2/(b*x+a)^
2*A*e-1/2/(a*e-b*d)^2/(b*x+a)^2*B*d+e^2/(a*e-b*d)^3/(b*x+a)*A-e/(a*e-b*d)^3/(b*x
+a)*B*d-e^3/(a*e-b*d)^4*ln(b*x+a)*A+e^2/(a*e-b*d)^4*ln(b*x+a)*B*d+e^3/(a*e-b*d)^
4*ln(e*x+d)*A-e^2/(a*e-b*d)^4*ln(e*x+d)*B*d

_______________________________________________________________________________________

Maxima [A]  time = 0.717187, size = 610, normalized size = 4.18 \[ \frac{{\left (B d e^{2} - A e^{3}\right )} \log \left (b x + a\right )}{b^{4} d^{4} - 4 \, a b^{3} d^{3} e + 6 \, a^{2} b^{2} d^{2} e^{2} - 4 \, a^{3} b d e^{3} + a^{4} e^{4}} - \frac{{\left (B d e^{2} - A e^{3}\right )} \log \left (e x + d\right )}{b^{4} d^{4} - 4 \, a b^{3} d^{3} e + 6 \, a^{2} b^{2} d^{2} e^{2} - 4 \, a^{3} b d e^{3} + a^{4} e^{4}} - \frac{{\left (B a b^{2} + 2 \, A b^{3}\right )} d^{2} -{\left (5 \, B a^{2} b + 7 \, A a b^{2}\right )} d e -{\left (2 \, B a^{3} - 11 \, A a^{2} b\right )} e^{2} - 6 \,{\left (B b^{3} d e - A b^{3} e^{2}\right )} x^{2} + 3 \,{\left (B b^{3} d^{2} + 5 \, A a b^{2} e^{2} -{\left (5 \, B a b^{2} + A b^{3}\right )} d e\right )} x}{6 \,{\left (a^{3} b^{4} d^{3} - 3 \, a^{4} b^{3} d^{2} e + 3 \, a^{5} b^{2} d e^{2} - a^{6} b e^{3} +{\left (b^{7} d^{3} - 3 \, a b^{6} d^{2} e + 3 \, a^{2} b^{5} d e^{2} - a^{3} b^{4} e^{3}\right )} x^{3} + 3 \,{\left (a b^{6} d^{3} - 3 \, a^{2} b^{5} d^{2} e + 3 \, a^{3} b^{4} d e^{2} - a^{4} b^{3} e^{3}\right )} x^{2} + 3 \,{\left (a^{2} b^{5} d^{3} - 3 \, a^{3} b^{4} d^{2} e + 3 \, a^{4} b^{3} d e^{2} - a^{5} b^{2} e^{3}\right )} x\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/((b^2*x^2 + 2*a*b*x + a^2)^2*(e*x + d)),x, algorithm="maxima")

[Out]

(B*d*e^2 - A*e^3)*log(b*x + a)/(b^4*d^4 - 4*a*b^3*d^3*e + 6*a^2*b^2*d^2*e^2 - 4*
a^3*b*d*e^3 + a^4*e^4) - (B*d*e^2 - A*e^3)*log(e*x + d)/(b^4*d^4 - 4*a*b^3*d^3*e
 + 6*a^2*b^2*d^2*e^2 - 4*a^3*b*d*e^3 + a^4*e^4) - 1/6*((B*a*b^2 + 2*A*b^3)*d^2 -
 (5*B*a^2*b + 7*A*a*b^2)*d*e - (2*B*a^3 - 11*A*a^2*b)*e^2 - 6*(B*b^3*d*e - A*b^3
*e^2)*x^2 + 3*(B*b^3*d^2 + 5*A*a*b^2*e^2 - (5*B*a*b^2 + A*b^3)*d*e)*x)/(a^3*b^4*
d^3 - 3*a^4*b^3*d^2*e + 3*a^5*b^2*d*e^2 - a^6*b*e^3 + (b^7*d^3 - 3*a*b^6*d^2*e +
 3*a^2*b^5*d*e^2 - a^3*b^4*e^3)*x^3 + 3*(a*b^6*d^3 - 3*a^2*b^5*d^2*e + 3*a^3*b^4
*d*e^2 - a^4*b^3*e^3)*x^2 + 3*(a^2*b^5*d^3 - 3*a^3*b^4*d^2*e + 3*a^4*b^3*d*e^2 -
 a^5*b^2*e^3)*x)

_______________________________________________________________________________________

Fricas [A]  time = 0.294199, size = 868, normalized size = 5.95 \[ -\frac{{\left (B a b^{3} + 2 \, A b^{4}\right )} d^{3} - 3 \,{\left (2 \, B a^{2} b^{2} + 3 \, A a b^{3}\right )} d^{2} e + 3 \,{\left (B a^{3} b + 6 \, A a^{2} b^{2}\right )} d e^{2} +{\left (2 \, B a^{4} - 11 \, A a^{3} b\right )} e^{3} - 6 \,{\left (B b^{4} d^{2} e + A a b^{3} e^{3} -{\left (B a b^{3} + A b^{4}\right )} d e^{2}\right )} x^{2} + 3 \,{\left (B b^{4} d^{3} - 5 \, A a^{2} b^{2} e^{3} -{\left (6 \, B a b^{3} + A b^{4}\right )} d^{2} e +{\left (5 \, B a^{2} b^{2} + 6 \, A a b^{3}\right )} d e^{2}\right )} x - 6 \,{\left (B a^{3} b d e^{2} - A a^{3} b e^{3} +{\left (B b^{4} d e^{2} - A b^{4} e^{3}\right )} x^{3} + 3 \,{\left (B a b^{3} d e^{2} - A a b^{3} e^{3}\right )} x^{2} + 3 \,{\left (B a^{2} b^{2} d e^{2} - A a^{2} b^{2} e^{3}\right )} x\right )} \log \left (b x + a\right ) + 6 \,{\left (B a^{3} b d e^{2} - A a^{3} b e^{3} +{\left (B b^{4} d e^{2} - A b^{4} e^{3}\right )} x^{3} + 3 \,{\left (B a b^{3} d e^{2} - A a b^{3} e^{3}\right )} x^{2} + 3 \,{\left (B a^{2} b^{2} d e^{2} - A a^{2} b^{2} e^{3}\right )} x\right )} \log \left (e x + d\right )}{6 \,{\left (a^{3} b^{5} d^{4} - 4 \, a^{4} b^{4} d^{3} e + 6 \, a^{5} b^{3} d^{2} e^{2} - 4 \, a^{6} b^{2} d e^{3} + a^{7} b e^{4} +{\left (b^{8} d^{4} - 4 \, a b^{7} d^{3} e + 6 \, a^{2} b^{6} d^{2} e^{2} - 4 \, a^{3} b^{5} d e^{3} + a^{4} b^{4} e^{4}\right )} x^{3} + 3 \,{\left (a b^{7} d^{4} - 4 \, a^{2} b^{6} d^{3} e + 6 \, a^{3} b^{5} d^{2} e^{2} - 4 \, a^{4} b^{4} d e^{3} + a^{5} b^{3} e^{4}\right )} x^{2} + 3 \,{\left (a^{2} b^{6} d^{4} - 4 \, a^{3} b^{5} d^{3} e + 6 \, a^{4} b^{4} d^{2} e^{2} - 4 \, a^{5} b^{3} d e^{3} + a^{6} b^{2} e^{4}\right )} x\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/((b^2*x^2 + 2*a*b*x + a^2)^2*(e*x + d)),x, algorithm="fricas")

[Out]

-1/6*((B*a*b^3 + 2*A*b^4)*d^3 - 3*(2*B*a^2*b^2 + 3*A*a*b^3)*d^2*e + 3*(B*a^3*b +
 6*A*a^2*b^2)*d*e^2 + (2*B*a^4 - 11*A*a^3*b)*e^3 - 6*(B*b^4*d^2*e + A*a*b^3*e^3
- (B*a*b^3 + A*b^4)*d*e^2)*x^2 + 3*(B*b^4*d^3 - 5*A*a^2*b^2*e^3 - (6*B*a*b^3 + A
*b^4)*d^2*e + (5*B*a^2*b^2 + 6*A*a*b^3)*d*e^2)*x - 6*(B*a^3*b*d*e^2 - A*a^3*b*e^
3 + (B*b^4*d*e^2 - A*b^4*e^3)*x^3 + 3*(B*a*b^3*d*e^2 - A*a*b^3*e^3)*x^2 + 3*(B*a
^2*b^2*d*e^2 - A*a^2*b^2*e^3)*x)*log(b*x + a) + 6*(B*a^3*b*d*e^2 - A*a^3*b*e^3 +
 (B*b^4*d*e^2 - A*b^4*e^3)*x^3 + 3*(B*a*b^3*d*e^2 - A*a*b^3*e^3)*x^2 + 3*(B*a^2*
b^2*d*e^2 - A*a^2*b^2*e^3)*x)*log(e*x + d))/(a^3*b^5*d^4 - 4*a^4*b^4*d^3*e + 6*a
^5*b^3*d^2*e^2 - 4*a^6*b^2*d*e^3 + a^7*b*e^4 + (b^8*d^4 - 4*a*b^7*d^3*e + 6*a^2*
b^6*d^2*e^2 - 4*a^3*b^5*d*e^3 + a^4*b^4*e^4)*x^3 + 3*(a*b^7*d^4 - 4*a^2*b^6*d^3*
e + 6*a^3*b^5*d^2*e^2 - 4*a^4*b^4*d*e^3 + a^5*b^3*e^4)*x^2 + 3*(a^2*b^6*d^4 - 4*
a^3*b^5*d^3*e + 6*a^4*b^4*d^2*e^2 - 4*a^5*b^3*d*e^3 + a^6*b^2*e^4)*x)

_______________________________________________________________________________________

Sympy [A]  time = 11.8586, size = 818, normalized size = 5.6 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x+A)/(e*x+d)/(b**2*x**2+2*a*b*x+a**2)**2,x)

[Out]

-e**2*(-A*e + B*d)*log(x + (-A*a*e**4 - A*b*d*e**3 + B*a*d*e**3 + B*b*d**2*e**2
- a**5*e**7*(-A*e + B*d)/(a*e - b*d)**4 + 5*a**4*b*d*e**6*(-A*e + B*d)/(a*e - b*
d)**4 - 10*a**3*b**2*d**2*e**5*(-A*e + B*d)/(a*e - b*d)**4 + 10*a**2*b**3*d**3*e
**4*(-A*e + B*d)/(a*e - b*d)**4 - 5*a*b**4*d**4*e**3*(-A*e + B*d)/(a*e - b*d)**4
 + b**5*d**5*e**2*(-A*e + B*d)/(a*e - b*d)**4)/(-2*A*b*e**4 + 2*B*b*d*e**3))/(a*
e - b*d)**4 + e**2*(-A*e + B*d)*log(x + (-A*a*e**4 - A*b*d*e**3 + B*a*d*e**3 + B
*b*d**2*e**2 + a**5*e**7*(-A*e + B*d)/(a*e - b*d)**4 - 5*a**4*b*d*e**6*(-A*e + B
*d)/(a*e - b*d)**4 + 10*a**3*b**2*d**2*e**5*(-A*e + B*d)/(a*e - b*d)**4 - 10*a**
2*b**3*d**3*e**4*(-A*e + B*d)/(a*e - b*d)**4 + 5*a*b**4*d**4*e**3*(-A*e + B*d)/(
a*e - b*d)**4 - b**5*d**5*e**2*(-A*e + B*d)/(a*e - b*d)**4)/(-2*A*b*e**4 + 2*B*b
*d*e**3))/(a*e - b*d)**4 - (-11*A*a**2*b*e**2 + 7*A*a*b**2*d*e - 2*A*b**3*d**2 +
 2*B*a**3*e**2 + 5*B*a**2*b*d*e - B*a*b**2*d**2 + x**2*(-6*A*b**3*e**2 + 6*B*b**
3*d*e) + x*(-15*A*a*b**2*e**2 + 3*A*b**3*d*e + 15*B*a*b**2*d*e - 3*B*b**3*d**2))
/(6*a**6*b*e**3 - 18*a**5*b**2*d*e**2 + 18*a**4*b**3*d**2*e - 6*a**3*b**4*d**3 +
 x**3*(6*a**3*b**4*e**3 - 18*a**2*b**5*d*e**2 + 18*a*b**6*d**2*e - 6*b**7*d**3)
+ x**2*(18*a**4*b**3*e**3 - 54*a**3*b**4*d*e**2 + 54*a**2*b**5*d**2*e - 18*a*b**
6*d**3) + x*(18*a**5*b**2*e**3 - 54*a**4*b**3*d*e**2 + 54*a**3*b**4*d**2*e - 18*
a**2*b**5*d**3))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.287768, size = 491, normalized size = 3.36 \[ \frac{{\left (B b d e^{2} - A b e^{3}\right )}{\rm ln}\left ({\left | b x + a \right |}\right )}{b^{5} d^{4} - 4 \, a b^{4} d^{3} e + 6 \, a^{2} b^{3} d^{2} e^{2} - 4 \, a^{3} b^{2} d e^{3} + a^{4} b e^{4}} - \frac{{\left (B d e^{3} - A e^{4}\right )}{\rm ln}\left ({\left | x e + d \right |}\right )}{b^{4} d^{4} e - 4 \, a b^{3} d^{3} e^{2} + 6 \, a^{2} b^{2} d^{2} e^{3} - 4 \, a^{3} b d e^{4} + a^{4} e^{5}} - \frac{B a b^{3} d^{3} + 2 \, A b^{4} d^{3} - 6 \, B a^{2} b^{2} d^{2} e - 9 \, A a b^{3} d^{2} e + 3 \, B a^{3} b d e^{2} + 18 \, A a^{2} b^{2} d e^{2} + 2 \, B a^{4} e^{3} - 11 \, A a^{3} b e^{3} - 6 \,{\left (B b^{4} d^{2} e - B a b^{3} d e^{2} - A b^{4} d e^{2} + A a b^{3} e^{3}\right )} x^{2} + 3 \,{\left (B b^{4} d^{3} - 6 \, B a b^{3} d^{2} e - A b^{4} d^{2} e + 5 \, B a^{2} b^{2} d e^{2} + 6 \, A a b^{3} d e^{2} - 5 \, A a^{2} b^{2} e^{3}\right )} x}{6 \,{\left (b d - a e\right )}^{4}{\left (b x + a\right )}^{3} b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/((b^2*x^2 + 2*a*b*x + a^2)^2*(e*x + d)),x, algorithm="giac")

[Out]

(B*b*d*e^2 - A*b*e^3)*ln(abs(b*x + a))/(b^5*d^4 - 4*a*b^4*d^3*e + 6*a^2*b^3*d^2*
e^2 - 4*a^3*b^2*d*e^3 + a^4*b*e^4) - (B*d*e^3 - A*e^4)*ln(abs(x*e + d))/(b^4*d^4
*e - 4*a*b^3*d^3*e^2 + 6*a^2*b^2*d^2*e^3 - 4*a^3*b*d*e^4 + a^4*e^5) - 1/6*(B*a*b
^3*d^3 + 2*A*b^4*d^3 - 6*B*a^2*b^2*d^2*e - 9*A*a*b^3*d^2*e + 3*B*a^3*b*d*e^2 + 1
8*A*a^2*b^2*d*e^2 + 2*B*a^4*e^3 - 11*A*a^3*b*e^3 - 6*(B*b^4*d^2*e - B*a*b^3*d*e^
2 - A*b^4*d*e^2 + A*a*b^3*e^3)*x^2 + 3*(B*b^4*d^3 - 6*B*a*b^3*d^2*e - A*b^4*d^2*
e + 5*B*a^2*b^2*d*e^2 + 6*A*a*b^3*d*e^2 - 5*A*a^2*b^2*e^3)*x)/((b*d - a*e)^4*(b*
x + a)^3*b)